package com.changgou.common.enums;

/* 不同的异常类型枚举类*/
public enum HttpStateEnum {

    DELETE_ERROR(500, "数据删除失败"),

    UPDATE_ERROR(500, "数据修改失败"),

    INSERT_ERROR(500, "数据添加失败"),

    SUCCESS(200, "request success!"),

    /** 参数不齐全或参数错误 */
    BAD_REQUEST(400, "参数不正确"),

    /** 权限不足 */
    UNAUTHORIZED(401, "您未获得访问权限"),

    /** 未找到该数据*/
    NOT_FOUND(404, "服务器未找到想要的数据"),

    /** 未知错误 */
    UNKNOWN_EXCEPTION(500, "后台处理数据繁忙,请稍后...");


    private Integer status;
    private String message;

    HttpStateEnum(Integer status, String message) {
        this.status = status;
        this.message = message;
    }

    public Integer getStatus() {
        return status;
    }

    public String getMessage() {
        return message;
    }

}
